from pylab import plotfile, show, datetime

import matplotlib.finance as finance

ticker = 'IBM'

begdate = datetime.date(2016,1,1)
enddate = datetime.date.today()

x= finance.fetch_historical_yahoo(ticker, begdate, enddate)
print(x)
plotfile(x, (0,6,5))
show()